using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;

namespace PdfLib
{
    /// <summary>
    /// 
    /// </summary>
    [Serializable]
    public class PdfBookmark:IComparable 
    {
        private int _BookmarkID;
        /// <summary></summary>
        public int BookmarkID
        {
            get { return _BookmarkID; }
            set { _BookmarkID = value; }
        }

        private string _Title;
        /// <summary></summary>
        public string Title
        {
            get { return _Title; }
            set { _Title = value; }
        }

        private string _Path;
        /// <summary></summary>
        public string Path
        {
            get { return _Path; }
            set { _Path = value; }
        }

        private int _FromPageNumber;
        /// <summary></summary>
        public int FromPageNumber
        {
            get { return _FromPageNumber; }
            set { _FromPageNumber = value; }
        }

        private PointF _FromPos;
        /// <summary></summary>
        public PointF FromPosition
        {
            get { return _FromPos; }
            set { _FromPos = value; }
        }

        private int _ToPageNumber;
        /// <summary></summary>
        public int ToPageNumber
        {
            get { return _ToPageNumber; }
            set { _ToPageNumber = value; }
        }

        private PointF _ToPosition;
        /// <summary></summary>
        public PointF ToPosition
        {
            get { return _ToPosition; }
            set { _ToPosition = value; }
        }

        private string[] _SearchPatterns;
        /// <summary></summary>
        public string[] SearchPatterns
        {
            get
            {
                return this._SearchPatterns;
            }
            set
            {
                this._SearchPatterns = value;
            }
        }

        public int CompareTo(object obj)
        {
            if (obj.GetType() == typeof(PdfBookmark))
            {
                PdfBookmark otherBookmark = (PdfBookmark) obj;
                return this.Path.CompareTo(otherBookmark.Path);
            }
            else
                return 0;
        }
    }
}
